import bus from "@/bus";
import { renderButton } from '@/util';
let data = {
  status: 'pass',
  totalItem: 1,
  pageSize: window.$pageSize,
  currentPage: 1,
  form: {
  },
  columns: [{
      type: 'selection',
      width: 60,
      align: 'left',
      fixed: 'left'
  }, {
    title: '登录手机号',
    key: 'storePhone',
    align: 'left',
    minWidth: 150,
  }, {
    title: '门店名称',
    key: 'storeName',
    align: 'left',
    minWidth: 200,
    tooltip: true
  }, {
    title: '营业执照号',
    key: 'businessLicenseNo',
    align: 'left',
    minWidth: 220,
    render: (h, p) => {
      return <div>{p.row.businessLicenseNo || '-'}</div>
    }
  }, {
    title: '详细地址',
    key: 'storeAddress',
    align: 'left',
    minWidth: 250,
    tooltip: true
  }, {
    title: '联系人姓名',
    key: 'ownerName',
    align: 'left',
    minWidth: 120,
  }, {
    title: '店主手机号',
    key: 'ownerPhone',
    align: 'left',
    minWidth: 150,
  }, {
    title: '店主身份证',
    key: 'ownerIdcardNo',
    align: 'left',
    minWidth: 200,
  }, {
    title: '主营类目',
    key: 'categoryName',
    align: 'left',
    minWidth: 150,
    tooltip: true
  },{
    title: '提交认证',
    key: 'createDate',
    align: 'left',
    minWidth: 180,
  },{
    title: '认证状态',
    key: 'isContracted',
    align: 'left',
    minWidth: 100,
    render: (h, p) => {
      return h('div', {}, p.row.isContracted ? '认证' : '未认证')
    }
  },{
    title: '认证审核',
    key: 'auditStatus',
    align: 'left',
    minWidth: 120,
    render: (h, p) => {
      let obj = { 0: '待审核', 1: '审核未通过', 2: '审核通过' }
      return h('div', {}, obj[p.row.auditStatus])
    }
  },{
    title: '操作',
    align: 'left',
    minWidth: 200,
    fixed: 'right',
    render: (h, params) => {
      return (
        <div>
          { renderButton(h, { text: '基础信息', type: 'primary' }, ()=>{ bus.$emit("baseRow", params.row)})}
          { renderButton(h, { text: '签约信息', type: 'primary', disabled: !params.row.contractId }, ()=>{ bus.$emit("detailRow", params.row) })}
        </div>
      )
    }
  }],
  data: [{}]
}
export default data;
